home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amoszine 8
/
Amoszine 8 (Disk 2 of 3).adf
/
Powerbobs.lha
/
powerbobsv1.0
/
demos
/
PowerBobs_test.Asc
< prev
next >
Wrap
Text File
|
1995-06-30
|
3KB
|
121 lines
' Program: Count number of bobs before frame rate drops from 50fps.
' Author : Paul Overy
'
' *** TRUE RESULTS ONLY WITH AMOS CLASSIC ***
' *** ONLY CLASSIC CAN FULLY LOCK OUT THE ***
' *** MULTITAKING SYSTEM. ***
'
' This program was written to test Powerbobs against Amos bobs.
'
' I've kept this test fair by not using any Powerbob array arithmetic
' commands. So it's just bob's against Pbob's.
'
'
Paper 0 : Cls 0
Repeat : Input "What bob size to test (16 or 32)?";SIZE : Until SIZE=32 or SIZE=16
Repeat : Input "How many Bit Planes (1 to 5)?";C : Until C>0 and C<6
Screen Open 0,320,256,2^C,Lowres : Screen Hide 0
Flash Off : Curs Off : Paper 0 : Pen 1
'
'-- Cut out all bobs
'
N=1
For L=1 To SIZE
Ink 0 : Bar 0,0 To SIZE,SIZE : Ink 1 : Bar 0,0 To L,L
Get Bob N,0,0 To SIZE,SIZE : Inc N
Next L
For L=SIZE To 1 Step -1
Ink 0 : Bar 0,0 To SIZE,SIZE : Ink 1 : Bar 0,0 To L,L
Get Bob N,0,0 To SIZE,SIZE : Inc N
Next L
'
NULL=Execall(-132) : Rem -- Multitasking off
'
Cls 0
Centre Cdown$+Border$("TESTING AMOSBOBS, PLEASE WAIT...",1)
Double Buffer : Autoback 0 : Bob Update Off
Screen Show 0
'
'-- Fisrt test, for Amos.
'
AMOSBOBS_TOTAL=1 : Timer=0 : COUNT_FRAMES=1
'
Do
Add _ANIM,1,1 To SIZE*2
W=0
For K=1 To AMOSBOBS_TOTAL
Bob K,X+W,((K-1)/5)*18,_ANIM
Add W,18,0 To 72
Next K
Add X,1,0 To 320
Bob Clear : Bob Draw
Screen Swap
Wait Vbl
Inc COUNT_FRAMES : T=Timer
If COUNT_FRAMES=50
Exit If T>50
Inc AMOSBOBS_TOTAL
COUNT_FRAMES=1
Exit If POWERBOBS_TOTAL>64
Timer=1
End If
Loop
'
Cls 0
Centre Cdown$+Border$("TESTING POWERBOBS, PLEASE WAIT...",1)
Screen Swap
Screen Copy Physic To Logic
'
'-- Define pbob types.
'
Make Mask : Reserve Pbobs 64 : Pbob Dbuf True
For K=1 To 64
Pbob Height K,SIZE
Next K
'
'-- 2nd test, for Powerbobs.
'
POWERBOBS_TOTAL=1 : Timer=0 : COUNT_FRAMES=1
'
Do
Add _ANIM,1,1 To SIZE*2
W=0
For K=1 To POWERBOBS_TOTAL
Pbob K,X+W,((K-1)/5)*18,_ANIM
Add W,18,0 To 72
Next K
Add X,1,0 To 320
Pbob Clear 1 To POWERBOBS_TOTAL
Pbob Draw 1 To POWERBOBS_TOTAL
Screen Swap
Wait Vbl
Inc COUNT_FRAMES : T=Timer
If COUNT_FRAMES=50
Exit If T>50
Inc POWERBOBS_TOTAL
COUNT_FRAMES=1
Exit If POWERBOBS_TOTAL>64
Timer=1
End If
Loop
'
NULL=Execall(-138) : Rem -- Multitaking on
'
'-- Report on both speed tests.
'
Cls 0 : Home
Centre Cdown$+Border$("TEST RESULTS",1)
Print At(0,4)+"Total number of Bobs updated"
Print "before frame rate dropped from 50fps"
Print
Print "On a";2^C;" Colour screen:-"
Print
Print " Normal Amos =";AMOSBOBS_TOTAL-1
Print " PowerBobs =";POWERBOBS_TOTAL-1
Print " --"
Print " ";POWERBOBS_TOTAL-AMOSBOBS_TOTAL;" Extra bob(s)"
Print " --"
Print Cdown$+Cdown$+"Any key to exit"
Screen Swap
Wait Key